<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>机票月份的价格</title>
</head>
<body>
	<script>
		var p = prompt('请输入月份');

		if(p<=12){
			if(p >= 5 && p<=10){
				var wap = prompt('请输入头等舱或经济舱');
				if(wap == '头等舱'){
					alert('机票价格:2000￥');
					console.log('机票价格:2000￥')
				}else if (wap == '经济舱') {
					alert('机票价格:800￥');
					console.log('机票价格:800￥')
				}else{
					alert('输入错误');
					console.log('输入错误');
				}
			}else {
				var wap = prompt('请输入头等舱或经济舱');
				if(wap == '头等舱'){
					alert('机票价格:800￥');
					console.log('机票价格:800￥');
				}else if (wap == '经济舱') {
					alert('机票价格:200￥');
					console.log('机票价格:200￥');
				}else{
					alert('输入错误');
					console.log('输入错误');
				}
			}
		}else{
			alert('输入错误');
			console.log('输入错误');
		}
		



	</script>
</body>
</html>